package com.packet.controller;

import com.packet.pojo.Examine;
import com.packet.pojo.Staff;
import com.packet.service.GetServiceFormFinance;
import com.packet.service.StaffExamineService;
import com.packet.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @ClassName:StaffExamineController
 * @Author: mu
 * @Date:2023-12-08 14:02
 * @Describe:
 */
@Controller
public class StaffExamineController {
    @Autowired
    StaffExamineService staffExamineService;
    @Autowired
    UserLoginService userLoginService;

    @Autowired
    GetServiceFormFinance getServiceFormFinance;

    @RequestMapping("/staff/getRejectExamine/{bid}")
    public String getRejectExamine(@PathVariable("bid") Integer bid, Model model){
        Examine examine = getServiceFormFinance.getExamines(bid);
        model.addAttribute("examineDetail",examine.getDetail());
        Staff staff = userLoginService.selectById(examine.getSid());
        model.addAttribute("examineName",staff.getSName());
        return "/staff/examine/rejectExamine";
    }

}
